#!/usr/bin/python

import sys

for eachLine in sys.stdin:
    eachLine = eachLine.strip()
    eachLine = "\t".join(eachLine.split("\t")[:len(eachLine.split("\t"))-2])

    art_name = eachLine.split("\t")[0]
    categories = eachLine.split("\t")[1:]
    eachLine = ""

    if(art_name.find("Categor")!=-1):
        continue

    eachLine = art_name
    
    for eachCategory in categories:
        if(eachCategory != "Category"):
            print "*\t*"
            print "*\t"+eachCategory
            eachLine += "\t" + eachCategory

    print eachLine

